

package proyecto;


import java.awt.BorderLayout;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

/**
 *
 * @author Jorge.gaspariano
 */
public class ConfigAdmin extends javax.swing.JFrame {

    String inicial;
    public ConfigAdmin() {
        initComponents();
       
    }
    public ConfigAdmin(String inicial){
        this.inicial= inicial;
        
        initComponents();
        this.setTitle("Configuracion Administrador");
        setSize(300,300);
        
    }

    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        menusalir = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        menucambiocontra = new javax.swing.JMenuItem();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        menualusuario = new javax.swing.JMenuItem();
        menualcliente = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenu5 = new javax.swing.JMenu();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenuItem6 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jMenu1.setText("Archivo");

        menusalir.setText("Salir");
        menusalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menusalirActionPerformed(evt);
            }
        });
        jMenu1.add(menusalir);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edicion");

        menucambiocontra.setText("Cambiar contraseña");
        menucambiocontra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menucambiocontraActionPerformed(evt);
            }
        });
        jMenu2.add(menucambiocontra);

        jMenuItem1.setText("Cambio contraseña usuario");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem1);

        jMenuBar1.add(jMenu2);

        jMenu3.setText("Alta");

        menualusuario.setText(" Usuario");
        menualusuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menualusuarioActionPerformed(evt);
            }
        });
        jMenu3.add(menualusuario);

        menualcliente.setText("Cliente");
        menualcliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menualclienteActionPerformed(evt);
            }
        });
        jMenu3.add(menualcliente);

        jMenuBar1.add(jMenu3);

        jMenu4.setText("Baja");

        jMenuItem4.setText("Usuario");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        jMenu4.add(jMenuItem4);

        jMenuBar1.add(jMenu4);

        jMenu5.setText("Modificar");

        jMenuItem5.setText("Cliente");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        jMenu5.add(jMenuItem5);

        jMenuItem6.setText("Usuario");
        jMenu5.add(jMenuItem6);

        jMenuBar1.add(jMenu5);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 279, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void menusalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menusalirActionPerformed
                 System.exit(0);
    }//GEN-LAST:event_menusalirActionPerformed

    
    private void menucambiocontraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menucambiocontraActionPerformed
               Cambiocontra dialog = new Cambiocontra(new javax.swing.JFrame(), true,inicial);
                   dialog.setVisible(true);
        
    }//GEN-LAST:event_menucambiocontraActionPerformed

    private void menualclienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menualclienteActionPerformed
          AltaClientes dialog = new AltaClientes(new javax.swing.JFrame(), true,inicial);
                    dialog.setVisible(true);
                    
    }//GEN-LAST:event_menualclienteActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        CambioContraUsuario dialog = new CambioContraUsuario(new javax.swing.JFrame(), true);
                    dialog.setVisible(true);
        
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void menualusuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menualusuarioActionPerformed
Altausuario dialog = new Altausuario(new javax.swing.JFrame(), true);
                dialog.setVisible(true);
    }//GEN-LAST:event_menualusuarioActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
       BajaUsuario dialog = new BajaUsuario(new javax.swing.JFrame(), true);
       dialog.setVisible(true);
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
        ModificarClientes dialog= new ModificarClientes(new javax.swing.JFrame(), true,inicial);
        dialog.setVisible(true);
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(ConfigAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(ConfigAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(ConfigAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ConfigAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ConfigAdmin().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem menualcliente;
    private javax.swing.JMenuItem menualusuario;
    private javax.swing.JMenuItem menucambiocontra;
    private javax.swing.JMenuItem menusalir;
    // End of variables declaration//GEN-END:variables
}
